<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">
        <title>订单管理</title>
        <link href="__MZUI__/css/admin.css" rel="stylesheet" type="text/css">
        <link href="__MZUI__/css/amazeui.css" rel="stylesheet" type="text/css">
        <link href="__CSS__/user/personal.css" rel="stylesheet" type="text/css">
        <link href="__CSS__/user/orstyle.css" rel="stylesheet" type="text/css">
        <link href="__CSS__/common.css" rel="stylesheet" type="text/css">
        <script type="text/javascript" src="__JQ__"></script>
        <script src="__MZUI__/js/amazeui.js"></script>
        <script type="text/javascript" src="__JS__/public.lib.js"></script>
        <script type="text/javascript" src="__LY__"></script>
    </head>
    <body>
        <!--头 -->
    <include file="Include/top" />
    <include file="Include/header" />
    <div class="center">
        <div class="col-main">
            <div class="main-wrap">
                <div class="user-order">
                    <!--标题 -->
                    <div class="am-cf am-padding">
                        <div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">订单管理</strong> / <small>Order</small></div>
                    </div>
                    <hr/>
                    <div class="am-tabs am-tabs-d2 am-margin">
                        <ul class="am-avg-sm-5 am-tabs-nav am-nav am-nav-tabs">
                            <li><a style="cursor: pointer;" href="{:U('Order/index')}">所有订单({$all})</a></li>
                            <li><a style="cursor: pointer;" href="{:U('Order/waitPay')}">待付款({$waitPay})</a></li>
                            <li class="am-active"><a style="cursor: pointer;" href="{:U('Order/waitSend')}">待发货({$waitSend})</a></li>
                            <li><a style="cursor: pointer;" href="{:U('Order/waitConfirm')}">待收货({$waitConfirm})</a></li>
                            <li><a style="cursor: pointer;" href="{:U('Order/waitRate')}">待评价({$waitRate})</a></li>
                        </ul>
                        <div class="am-tabs-bd">
                            <div class="am-tab-panel am-fade am-in am-active">
                                <div class="order-top">
                                    <div class="th th-item">
                                        <td class="td-inner">商品</td>
                                    </div>
                                    <div class="th th-price">
                                        <td class="td-inner">单价</td>
                                    </div>
                                    <div class="th th-number">
                                        <td class="td-inner">数量</td>
                                    </div>
                                    <div class="th th-operation">
                                        <td class="td-inner">商品操作</td>
                                    </div>
                                    <div class="th th-amount">
                                        <td class="td-inner">合计</td>
                                    </div>
                                    <div class="th th-status">
                                        <td class="td-inner">交易状态</td>
                                    </div>
                                    <div class="th th-change">
                                        <td class="td-inner">交易操作</td>
                                    </div>
                                </div>

                                <div class="order-main">
                                    <div class="order-list">
                                        <foreach item="m" name="arrOrder">
                                            <!--交易成功-->
                                            <div class="order-status5">
                                                <div class="order-title">
                                                    <div class="dd-num">订单编号：<a href="javascript:;">{$m['order_sn']}</a></div>
                                                    <span>成交时间：{$m['add_time']|date="Y-m-d H:i:s",###}</span>
                                                    <em>店铺：{$m['store_name']}</em>
                                                </div>
                                                <div class="order-content">
                                                    <div class="order-left">
                                                        <foreach name="m.OrderGoods" item="v1" key="k">
                                                            <ul class="item-list">
                                                                <li class="td td-item">
                                                                    <div class="item-pic">
                                                                        <a href="#" class="J_MakePoint"><img src="{$v1['goods_image']}"  width="80" height="80" class="itempic J_ItemImg"></a>
                                                                    </div>
                                                                    <div class="item-info">
                                                                        <div class="item-basic-info">
                                                                            <a href="#"> <p>{$v1['goods_title']}</p><p class="info-little">{$v1['goods_attri_info']}</p></a>
                                                                        </div>
                                                                    </div>
                                                                </li>
                                                                <li class="td td-price">
                                                                    <div class="item-price">{$v1['goods_price']}</div>
                                                                </li>
                                                                <li class="td td-number">
                                                                    <div class="item-number"><span>×</span>{$v1['goods_num']}</div>
                                                                </li>
                                                                <li class="td td-operation">
                                                                    <div class="item-operation"></div>
                                                                </li>
                                                            </ul>
                                                        </foreach>
                                                    </div>
                                                    <div class="order-right">
                                                        <li class="td td-amount">
                                                            <div class="item-amount">合计：{$m['goods_amount']}<p>含运费：<span>{$m['shipping_fee']}</span></p></div>
                                                        </li>
                                                        <div class="move-right">

                                                            <!-- 已付款  -->
                                                            <li class="td td-status">
                                                                <div class="item-status">
                                                                    <p class="Mystatus">买家已付款</p>
                                                                    <p class="order-info"><a href="{:U('Order/details',array('key'=>$m['order_sn']))}">订单详情</a></p>
                                                                </div>
                                                            </li>
                                                            <li class="td td-change">
                                                                <div class="am-btn am-btn-danger anniu notice" data="{$m['order_id']}" href="javascript:;" title="提醒发货">提醒发货</div>
                                                            </li>

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </foreach>
                                        <div class="page">{$page}</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
        <include file="Include/navigation" />
    </div>
    <include file="Include/footer" />
</body>
</html>
<script type="text/javascript">
    //提醒发货
    $('.notice').click(function () {
        var order_id = $(this).attr('data');
        layer.confirm('再次提醒商家发货吗？', {
            btn: ['确认', '取消'] //按钮
        }, function () {
            var data = {order_id:order_id};
            p = Aajax("{:U('/Order/notice')}", data);
            if(p.status){
                layer.msg(p.info);
            }else{
                layer.msg(p.info);
            }
        }, function () {
        });
    });
</script>